package com.appkubes.mall.admin.application.system.attachment.dao;

import com.appkubes.mall.core.pojo.MallAttachmentGroupMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface AttachmentGroupDao extends MallAttachmentGroupMapper {

    @Delete({"<script>",
            "Delete from mall_attachment_group where attachment_group_key in ",
            "<foreach item='key' index='index' collection='keys' open='(' separator=',' close=')'> #{key} </foreach> " ,
            "</script>"})
    int delete(@Param("keys") String[] keys);

}
